const fs = require('fs');
const path = require('path');

const gitHookPath = path.resolve('../../.git/hooks');

fs.rename(path.resolve(gitHookPath, 'post-checkout'), path.resolve(gitHookPath, 'post-checkout.bak'), (err) => {
    if (err) {
        throw err
    };
    fs.writeFileSync(path.join(__dirname, '.yarn-metadata.json'), `{"manifest": null}`);
    console.log('post-checkout已移除！');
});